#!/usr/bin/env bash

set -e -x

echo "-- chart/build --"

cd $(dirname $0)/..
. ./version

cd ..
mkdir -p build/chart
rm -rf build/chart/rancher
cp -rf ${1} build/chart/rancher

sed -i -e "s/%VERSION%/${CHART_VERSION}/g" build/chart/rancher/Chart.yaml
sed -i -e "s/%APP_VERSION%/${VERSION}/g" build/chart/rancher/Chart.yaml
